<template>
	<view>
		<!-- Header Section -->
		<view class="bg-header">
			<view class="container">
				<view class="header">
					<view class="user-info">
						<image class="avatar" src="/static/user/avatar.png"></image>
						<view class="user-type">
							<text class="username">萌新付加加</text>
							<image src="/static/user/super.png"></image>
						</view>
					</view>
					<view class="actions">
						<!-- <button class="scan-button">⋮</button> -->
						<!-- <button class="id-button">身份证</button> -->
						<image src="/static/user/card.png"></image>
					</view>
				</view>

				<!-- Wallet Section -->
				<view class="wallet-section">

					<view class="wallet-section-left">
						<view class="wallet-text-container">
							<image src="/static/user/order-icon.png" class="helper-icon"></image>
							<text class="wallet-text">我的钱包</text>
						</view>

						<text class="wallet-subtext">点击可查看我的钱包收益情况</text>

					</view>

					<button class="enter-button">立即进入</button>
				</view>
			</view>
		</view>
		<view class="bg-footer">
			<view class="container">
				<!-- Services Section -->
				<view class="services-container">
					<text class="services-title">我的服务</text>
					<view class="services-section">
						<view class="service-item" v-for="(service, index) in services" :key="index">
							<image :src="service.icon" class="service-icon"></image>
							<text class="service-text">{{ service.name }}</text>
						</view>
					</view>
				</view>

				<!-- Helper Section -->
				<view class="helper-section">
					<text class="services-title-1">小助手</text>
					<view class="helper-item" v-for="(item, index) in helpers" :key="index">
						<image :src="item.icon" class="helper-icon"></image>
						<text class="helper-text">{{ item.name }}</text>
						<!-- 添加箭头图标 -->
						<image class="arrow-icon" src="/static/user/arrow-icon.png"></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				services: [{
						name: '我的订单',
						icon: '/static/user/order-icon.png'
					},
					{
						name: '我的粉丝',
						icon: '/static/user/fans-icon.png'
					},
					{
						name: '我的关注',
						icon: '/static/user/follow-icon.png'
					}
				],
				helpers: [{
						name: '会员升级',
						icon: '/static/user/upgrade-icon.png'
					},
					{
						name: '会员订单',
						icon: '/static/user/member-order-icon.png'
					},
					{
						name: '商家入驻',
						icon: '/static/user/merchant-icon.png'
					},
					{
						name: '申请拓店',
						icon: '/static/user/apply-icon.png'
					},
					{
						name: '邀请好友',
						icon: '/static/user/invite-icon.png'
					},
					{
						name: '服务协议',
						icon: '/static/user/agreement-icon.png'
					},
					{
						name: '会员商城',
						icon: '/static/user/shop-icon.png'
					}
				]
			};
		}
	};
</script>

<style lang="scss" scoped>
	.bg-header {
		background-color: #000;
	}

	.bg-footer {
		background: #F2F5FA
	}

	.container {
		padding: 20rpx;
	}

	.header {
		display: flex;
		align-items: center;
		background-color: #FF6600;
		padding: 20rpx;
		border-radius: 10rpx;
	}

	.user-info {
		display: flex;
		align-items: center;
		flex: 1;
		height:150px;
	}

	.user-type {
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-left:10px;
		image{
			width:100px;
			height:20px;
		}
	}

	.avatar {
		width: 100rpx;
		height: 100rpx;
		border-radius: 50%;
		margin-bottom: 10rpx;
	}

	.username {
		font-size: 32rpx;
		color: #FFFFFF;
		font-weight: bold;
		margin-bottom:5px;
	}

	.member-status {
		font-size: 24rpx;
		color: #D3D3D3;
	}

	.actions {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		image{
			width:50px;
			height:20px;
		}
	}

	.scan-button,
	.id-button {
		background: transparent;
		border: none;
		color: #FFFFFF;
		font-size: 28rpx;
	}

	.wallet-section {
		margin-top: 20rpx;
		background-color: #3B3F58;
		/* 设置背景为黑色 */
		padding: 20rpx;
		border-radius: 30rpx;
		/* 设置四周的圆角 */
		display: flex;
		justify-content: space-between;
		/* 内容均匀分布 */
		align-items: center;
		position: relative;
		/* 为了使用伪元素定位 */
		z-index: 1;
		/* 控制层级 */
		overflow: hidden;
		/* 防止溢出 */
	}

	.wallet-section::after {
		content: '';
		position: absolute;
		bottom: -20px;
		/* 弧线向下偏移 */
		left: 0;
		width: 100%;
		height: 40px;
		/* 弧线高度 */
		background-color: #3B3F58;
		/* 弧线颜色与背景一致 */
		border-radius: 50% 50% 0 0;
		/* 创建顶部弧形 */
		z-index: -1;
		/* 确保弧线在 .wallet-section 下方 */
	}


	.wallet-section-left {
		display: flex;
		flex-direction: column;
	}

	.wallet-text-container {

		display: flex;
		align-items: center;
		/* 图标和文本水平排列 */
	}

	.wallet-text {
		font-size: 28rpx;
		font-weight: bold;
		color: #fff;
	}

	.wallet-subtext {
		font-size: 24rpx;
		color: #fff;
		padding-top: 10px;
	}

	.enter-button {
		background-color: #FF6600;
		color: #FFFFFF;
		border-radius: 50px;
		/* 圆角效果 */
		// padding: 10rpx 20rpx; /* 设置左右内边距 */
		height: 70rpx;
		/* 设置按钮的高度 */
		width: auto;
		/* 宽度自适应，保持文本居中 */
		display: flex;
		justify-content: center;
		align-items: center;
		/* 确保文本居中 */
		margin-right: 5px
	}

	.services-container {
		margin-top: 20rpx;
		background-color: #FFFFFF;
		/* 设置背景为白色 */
		border-radius: 10px;
		/* 设置圆角为 50px */
		padding: 20rpx;
		
		/* 可选：为容器添加内边距，让内容不紧贴边缘 */
	}

	// 

	.services-title {
		margin-left: 10px;
		font-size: 30rpx;
		font-weight: bold;
		margin-bottom: 10rpx;
	}
	
	.services-title-1 {
		font-size: 30rpx;
		font-weight: bold;
		margin-bottom: 10rpx;
	}

	.services-section {
		margin-top: 20px;
		display: flex;
		justify-content: space-between;
	}

	.service-item {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 33%;
	}

	.service-icon {
		width: 80rpx;
		height: 80rpx;
		margin-bottom: 10rpx;
	}

	.service-text {
		font-size: 26rpx;
	}

	.helper-section {
		padding: 20px;
		margin-top: 40rpx;
		background-color: #fff;

		.services-title {
			// margin-bottom:20px;
		}
	}

	.helper-item {
		margin-top: 20px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		/* 使箭头图标和文本分开 */
		margin-bottom: 20rpx;
	}

	.helper-icon {
		width: 40rpx;
		height: 40rpx;
		margin-right: 10rpx;
	}

	.helper-text {
		font-size: 28rpx;
		flex: 1;
		/* 让文本占据剩余空间 */
	}

	.arrow-icon {
		width: 20rpx;
		height: 20rpx;
	}
</style>